<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>WriteCGIStringN</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">WriteCGIStringN()</font></b></p>
<p><b>语法</b></p><blockquote>

Result = <font color="#3A3966"><b>WriteCGIStringN</b></font>(String$ [, Encoding])</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Write a string to the CGI output, including a carriage return. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>String$</i></td>
<td width="90%"> 
要写入的字符串. 

</td></tr>
<tr><td><i>Encoding (optional)</i></td>
<td> 
The string encoding to use. 它可以是以下值之一︰ 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_UTF8</font> (default)
  <font color="#924B72">#PB_Ascii</font>
</font></pre>

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>



Returns non-zero if the string has been successfully written to the CGI output. 

 

</blockquote><p><b>示例</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <b><font color="#3A3966">Not</font></b> <font color="#3A3966">InitCGI</font>() <b><font color="#3A3966">Or</font></b> <b><font color="#3A3966">Not</font></b> <font color="#3A3966">ReadCGI</font>()
    <b><font color="#3A3966">End</font></b>
  <b><font color="#3A3966">EndIf</font></b>
  
<font color="#3A3966">  WriteCGIHeader</font>(<font color="#924B72">#PB_CGI_HeaderContentType</font>, "text/html", <font color="#924B72">#PB_CGI_LastHeader</font>)
  
  <font color="#3A3966">; Using cariage return will make the page more readable when using "Show page source" in the browser</font>
  <font color="#3A3966">;</font>
<font color="#3A3966">  WriteCGIStringN</font>("&lt;html&gt;&lt;title&gt;PureBasic - test&lt;/title&gt;&lt;body&gt;")
<font color="#3A3966">  WriteCGIStringN</font>("Hello from PureBasic CGI&lt;br&gt;")
<font color="#3A3966">  WriteCGIStringN</font>("Actual time: &lt;b&gt;"+<font color="#3A3966">FormatDate</font>("%hh:%ii",<font color="#3A3966"> Date</font>()) + "&lt;/b&gt;")
<font color="#3A3966">  WriteCGIStringN</font>("&lt;/body&gt;&lt;/html&gt;")
</font></pre>

</blockquote><p><b>参阅</b></p><blockquote>

<a href="initcgi.html">InitCGI()</a>, <a href="writecgiheader.html">WriteCGIHeader()</a>, <a href="writecgistring.html">WriteCGIString()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=writecgistring.html>WriteCGIString()</a> - <a href="index.html">CGI Index</a><br><br>

</body></html>